package com.aos.eap.bean.net;

import com.aos.eap.base.Constant;
import com.pda.platform.ui.ui_pdaplatform.utils_public.FreeApi_DateUtils;

import java.io.Serializable;
import java.text.ParseException;
import java.util.UUID;

/**
 * @author lx
 * @date 2019/1/10
 * @desc
 */

public class HeaderBean implements Serializable {

    private String MachineName;
    private String TransactionID;
    private String MessageName;
    private String username;
    private String opid;
    private String EventTime;

    public HeaderBean(String MessageName) {
        this.MessageName = MessageName;
        this.TransactionID = UUID.randomUUID().toString();
        this.MachineName = "PDA";
        this.username = Constant.CURRENT_USER;
        try {
            this.EventTime = FreeApi_DateUtils.longToString(System.currentTimeMillis(), "yyyyMMddHHmmss");
        } catch (ParseException e) {
            e.printStackTrace();
        }
        this.opid = "";
    }

    public String getUsername() {
        return username == null ? "" : String.valueOf(username);
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getOpid() {
        return opid == null ? "" : String.valueOf(opid);
    }

    public void setOpid(String opid) {
        this.opid = opid;
    }

    public String getMachineName() {
        return MachineName == null ? "" : MachineName;
    }

    public void setMachineName(String machineName) {
        MachineName = machineName;
    }

    public String getTransactionID() {
        return TransactionID == null ? "" : TransactionID;
    }

    public void setTransactionID(String transactionID) {
        TransactionID = transactionID;
    }

    public String getMessageName() {
        return MessageName == null ? "" : MessageName;
    }

    public void setMessageName(String messageName) {
        MessageName = messageName;
    }


    public String getEventTime() {
        return EventTime == null ? "" : EventTime;
    }

    public void setEventTime(String eventTime) {
        EventTime = eventTime;
    }

}
